export class Point
{
    x = 0;
    y = 0;
    constructor(x,y)
    {
        this.x = x;//将外面的变量传进来
        this.y = y;
    }
    get_distance(other)
    {
        return Math.sqrt(Math.pow((this.x - other.x),2) + Math.pow((this.y - other.y),2))//Math.sqrt是开方
    }
}
// let point1 = new Point(0,0)
// console.log(point1);
// let point2 = new Point(1,1)
// console.log(point2);
// let distance = point1.get_distance(point2)
// console.log(distance);